<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jQuery.min.js"></script>
    <style>
        body{
            display: flex;
            justify-content: center;
            align-content: center;
        }
        img{
            width: 240px;
            height: 240px;
        }
        ul{
            margin: 0;
            padding: 0;
            display: inline-block;
        }
        li{
            list-style: none;
            width: 30px;
            height: 80px;
            text-align: center;
            line-height: 35px;
            border: 1px solid #bbb;
            box-sizing: border-box;
        }
        .sec{
            display: none;
        }
        .thi{
            display: none;
        }
    </style>
</head>
<body>
    <ul class="container">
        <li>苹果</li><img class="fir" src="images/apple.jpg">
        <li>柠檬</li><img class="sec" src="images/lemon.png">
        <li>橘子</li><img class="thi" src="images/orange.jpg">
    </ul>
    
    
    <script>
        $(function(){
            $('.container li').mouseover(function(){
                $(this).css('background-color','pink');
                $(this).siblings().css('background-color','');
                
            })
        })
    </script>
</body>
</html>